package com.fdmgroup.benchmarker.lib.common.utilities;

import com.fdmgroup.benchmarker.lib.common.BenchmarkResult;

public class BenchmarkResultUtility {

	public static BenchmarkResult mergeBenchmarkResults(
			BenchmarkResult[] results) {
		int totalTasks = 0;
		int totalDuration = 0;
		for (int i = 0; i < results.length; i++) {
			totalTasks += results[i].getTasks();
			totalDuration += results[i].getDuration();
		}
		return new BenchmarkResult(totalTasks, totalDuration);
	}
}
